package com.ideal.frame.prefix.form.search;

import lombok.Data;

import java.util.Date;

/**
 * @author: zhangdelei
 * @date: 2021/9/14-3:47 下午
 * @Description:
 **/
@Data
public class PrefixSyncParams {
    private Date syncTime;
    private String prefix;

    private PrefixSyncParams(Builder builder) {
        syncTime = builder.syncTime;
        prefix = builder.prefix;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder copy(PrefixSyncParams src) {
        Builder builder = new Builder();
        builder.syncTime = src.syncTime;
        builder.prefix = src.prefix;
        return builder;
    }

    public static class Builder {
        private Date syncTime;
        private String prefix;

        private Builder() {
        }

        public Builder syncTime(Date syncTime) {
            this.syncTime = syncTime;
            return this;
        }

        public Builder prefix(String prefix) {
            this.prefix = prefix;
            return this;
        }

        public PrefixSyncParams build() {
            return new PrefixSyncParams(this);
        }
    }
}
